-- GENERATED SPELL FOR [Foreman Cozzle] --


function spell0_4723(pUnit, Event) --@Fire Shield II,n/a--
pUnit:FullCastSpellOnTarget(184,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4723', 1000, 1)
end

function spell1_4723(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4723', 3000, 1)
end

function spell2_4723(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4723', 11500, 1)
end

function Sorts_4723(pUnit, Event)
local choix_sorts_4723 = math.random(0, 2)
if choix_sorts_4723 == 0 then
pUnit:RegisterEvent('spell0_4723', 1, 1)
end
if choix_sorts_4723 == 1 then
pUnit:RegisterEvent('spell1_4723', 1, 1)
end
if choix_sorts_4723 == 2 then
pUnit:RegisterEvent('spell2_4723', 1, 1)
end
end

function mob4723_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4723', math.random(1500, 3000), 1)
end

function mob4723_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4723_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4723_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4723, 1, 'mob4723_Action')
RegisterUnitEvent(4723, 2, 'mob4723_Leave')
RegisterUnitEvent(4723, 3, 'mob4723_Kill')
RegisterUnitEvent(4723, 4, 'mob4723_Die')
